android bundleRelease は aab に署名しません (android bundleRelease does not sign the aab)


問題の説明

android bundleRelease は aab に署名しません (android bundleRelease does not sign the aab)

私は Android アプリを作成しましたが、リリース プロセスの最終ステップはまだ手つかずです。gradle bundleRelease を実行すると、Play ストアにアップロードできる aab ファイルが生成されると思います。しかし、プレイストアはバンドルが署名されていないと言っています. ただし、ビルド プロセスは署名していると言っています:

> Task :app:preBuild UP‑TO‑DATE
> Task :app:preReleaseBuild UP‑TO‑DATE
> Task :app:compileReleaseRenderscript NO‑SOURCE
> Task :app:generateReleaseResValues UP‑TO‑DATE
> Task :app:generateReleaseResources UP‑TO‑DATE
> Task :app:mergeReleaseResources UP‑TO‑DATE
> Task :app:checkReleaseManifest UP‑TO‑DATE
> Task :app:createReleaseCompatibleScreenManifests UP‑TO‑DATE
> Task :app:mainApkListPersistenceRelease UP‑TO‑DATE
> Task :app:processReleaseManifest UP‑TO‑DATE
> Task :app:bundleReleaseResources UP‑TO‑DATE
> Task :app:checkReleaseDuplicateClasses UP‑TO‑DATE
> Task :app:mergeExtDexRelease UP‑TO‑DATE
> Task :app:compileReleaseAidl NO‑SOURCE
> Task :app:generateReleaseBuildConfig UP‑TO‑DATE
> Task :app:prepareLintJar UP‑TO‑DATE
> Task :app:generateReleaseSources UP‑TO‑DATE
> Task :app:javaPreCompileRelease UP‑TO‑DATE
> Task :app:processReleaseResources UP‑TO‑DATE
> Task :app:compileReleaseJavaWithJavac UP‑TO‑DATE
> Task :app:transformClassesWithDexBuilderForRelease UP‑TO‑DATE
> Task :app:mergeDexRelease UP‑TO‑DATE
> Task :app:mergeReleaseShaders UP‑TO‑DATE
> Task :app:compileReleaseShaders UP‑TO‑DATE
> Task :app:generateReleaseAssets UP‑TO‑DATE
> Task :app:mergeReleaseAssets UP‑TO‑DATE
> Task :app:mergeReleaseJniLibFolders UP‑TO‑DATE
> Task :app:transformNativeLibsWithMergeJniLibsForRelease UP‑TO‑DATE
> Task :app:processReleaseJavaRes NO‑SOURCE
> Task :app:transformResourcesWithMergeJavaResForRelease UP‑TO‑DATE
> Task :app:buildReleasePreBundle UP‑TO‑DATE
> Task :app:collectReleaseDependencies UP‑TO‑DATE
> Task :app:configureReleaseDependencies UP‑TO‑DATE
> Task :app:packageReleaseBundle UP‑TO‑DATE
> Task :app:signingConfigWriterRelease UP‑TO‑DATE
> Task :app:signReleaseBundle
> Task :app:bundleRelease

gradle ビルド スクリプトには署名セクションがあります:

android {
    ...
    signingConfigs {
        release {
            storeFile file(...)
            storePassword '...' 
            keyAlias '...'
            keyPassword '...'
        }
    }

ビルドを実行する前にすべての aab ファイルを削除すると、 app.aab は

..\app\build\outputs\bundle\release
で生成されます

Play ストアが aab を受け入れないことを除いて、すべて順調のようです:

The Android App Bundle was not signed.

リリース可能な aab を作成するにはどうすればよいですか?


リファレンスソリューション

方法 1:

If anyone is still looking for a solution ‑ Set debuggable to false in release config. Your app build gradle file should have following ‑

buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard‑android‑optimize.txt'), 'proguard‑rules.pro'
            signingConfig signingConfigs.release
            debuggable = false
        }
    }

方法 2:

It seems I found the solution here How to create a release signed apk file using Gradle?, apparently an signingConfig entry is needed in the buildType. Below is how that blocks looks in my build file after adding it.

android {
    ...
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard‑android‑optimize.txt'), 'proguard‑rules.pro'
            signingConfig signingConfigs.release
        }
    }
}

Is it weird that I expected that to already be there? Since I'm not a fan of either IntelliJ or Gradle, I'll chalk my feelings about the whole build and release process up to inexperience with the toolchain. Important is that the app is in the play store.

方法 3:

I had a similar issue where my flavor was being signed incorrectly. I had signing defaults specified in buildTypes and then overrides in productFlavors.

buildTypes {
stage {
signingConfig ...
}
release {
signingConfig ...
}
}

productFlavors {
myFlavor {
signingConfig ...
}
</code></pre>

Running ./gradlew bundleMyFlavorStage was grabbing the wrong signingConfig from buildTypes.stage instead of the product flavor override. My solution was to remove signingConfig from buildTypes.stage and buildTypes.release and keep the override in the productFlavors.

方法 4:

You can use ./gradlew :app:bundleRelease instead of ./gradlew bundleRelease

That works for me!

方法 5:

You can use ./gradlew signReleaseBundle instead of ./gradlew bundleRelease

That works for me!

(by tbeernotspiraldevtbeernotinder_gtTimLujack wang)

リファレンスドキュメント

  1. android bundleRelease does not sign the aab (CC BY‑SA 2.5/3.0/4.0)

#signing #release #google-play #Android






関連する質問

Google アクセス トークンを使用してユーザー プロファイルを取得するにはどうすればよいですか (How do I get user profile using Google Access Token)

コード署名ツールでMac開発者証明書を使用してJavaアプリケーションに署名するにはどうすればよいですか? (How to use Mac Developer Certificate with codesign tool to sign Java application?)

apk の署名中にエラーが発生しました: 見つかりません (Error during signing apk: unable to find)

JwtSecurityTokenHandler.CreateToken で署名するときに「無効なアルゴリズムが指定されました」 ("Invalid algorithm specified" when signing with JwtSecurityTokenHandler.CreateToken)

アセンブリの FullName プロパティのチェックを無効にできますか? 厳密な命名を使用せずに同様のチェックを実行できますか? (Can a check on the FullName property of an assembly be defeated? Can a similar check be performed without the use of strong naming?)

Cordova Build.json のパスワード セキュリティ (Cordova Build.json password security)

アプリリリース用の keytool による秘密鍵の取得 (Obtaining a private key through the keytool for app release)

android bundleRelease は aab に署名しません (android bundleRelease does not sign the aab)

証明書に iOS 署名証明書を作成する (create ios signing certificate in my certificates)

APKに署名する必要がある理由は何ですか? (What reasons does it have to sign apk?)

signtool.exe エラー: Excel マクロの署名時に SignerSign() が失敗しました (-2147220492/0x800403f4) (signtool.exe Error: SignerSign() failed (-2147220492/0x800403f4) when signing Excel Macro)

署名付き URL のこの実装は、かなり安全ですか? (Is this implementation of signed URLs reasonably secure?)







コメント